<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<link href="css/H-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://lib.h-ui.net/jquery/1.9.1/jquery.min.js"></script>
<title>jquery.Huispinner.js - H-ui前端框架官方网站 - 专注前端解决方案</title>
<meta name="keywords" content="jquery.Huispinner.js,数字加减插件,H-ui前端框架">
<meta name="description" content="jquery.Huispinner.js插件帮助手册。">
</head>
<body onLoad="prettyPrint()">
<article class="cl pd-20">
	<h1 class="page_title">jquery.Huispinner.js <span class="label label-success radius">已封装</span></h1>
	<p>H-ui.js 中已封装，无需单独下载。单独下载地址
		<a href="http://lib.h-ui.net/Hui/v3.0.4/jquery.Huispinner.js" class="btn radius btn-primary">jquery.Huispinner.js</a>
	</p>
	<p>jQuery.Huispinner是一个用js编写的jQuery插件，通常用在电商网站的购物车数量加减位置。可以设置最小值、最大值、递增递减（步长值），可手动输入数字，支持（上、下）方向键实现加、减。</p>
	<h2>使用方法</h2>
	<p>1、jQuery.Huispinner.js依赖jquery或者zepto.js。</p>
	<p>js调用</p>
<pre class="prettyprint linenums">$("#Huispinner-demo1").Huispinner(
	{
		value:3,
		minValue:5,
		maxValue:99,
		dis:1,
	},
	function(){
		alert("回调");
	}
);</pre>
	<h2>demo效果</h2>
	<div class="codeView docs-example">
		<div id="Huispinner-demo1"></div>
		<div id="Huispinner-demo2"></div>
		<div id="Huispinner-demo3"></div>
	</div>
	<h2>相关参数</h2>
	<table class="table table-border table-bg table-bordered">
		<thead>
			<tr>
				<th width="10%">属性</th>
				<th width="10%">默认值</th>
				<th width="15%">描述</th>
				<th>备注</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>value</td>
				<td>1</td>
				<td>文本框默认值</td>
				<td></td>
			</tr>
			<tr>
				<td>minValue</td>
				<td>1</td>
				<td>最小值</td>
				<td></td>
			</tr>	
			<tr>
				<td>maxValue</td>
				<td>999</td>
				<td>最大值</td>
				<td></td>
			</tr>
			<tr>
				<td>dis</td>
				<td>1</td>
				<td>每一步增量</td>
				<td></td>
			</tr>										
		</tbody>
	</table>	
</article>
<script type="text/javascript" src="http://lib.h-ui.net/prettify.js"></script>
<script type="text/javascript" src="js/jQuery.Huispinner.js"></script>
<script>
$(function(){
	$("#Huispinner-demo1").Huispinner(
		{
			value:3,
			minValue:5,
			maxValue:99
		},
		function(){
			alert("回调");
		}
	);
	$("#Huispinner-demo2").Huispinner(
		{},
		function(){
		alert("回调");
		}
	);
	$("#Huispinner-demo3").Huispinner(
		{
			value:1,
			minValue:10,
			maxValue:99,
			dis:2,		
		},
		function(){
			alert("回调");
		}
	);
});
</script>
</body>
</html>
